﻿<%@ Page Language="c#" Inherits="WinnerCMS.WebUI.Templates.WinnerCMS6.Comment.List" CodeBehind="List.aspx.cs" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title>评论中心</title>
    <style type="text/css">
        .f12
        {
            font-size: 12px;
            color: #4c4c4c;
            line-height: 22px;
        }  
        .f12_blue
        {
            font-weight: normal;
            font-size: 12px;
            color: #014EFD;
        }
 
        .comment
        { 
            padding: 5px 8px;
            font-size: 14px;
        }
        .comment p
        {
            padding: 5px 0;
        }
        
        .comment div
        {
            background: #ffe;
            padding: 3px;
            border: 1px solid #aaa;
            line-height: 140%;
            margin-bottom: 5px;
        }
        .comment h5
        {
            font-style:normal;
        }
        .comment .num
        {
            float:right;
        }
        .comment div .bar, .bar
        {
            border: 0;
            margin-right: 4px;
            width: auto;
            text-align: right;
        }
    </style>
    <%: Styles.Render("~/WinnerCMS6/Style") %>
    <!--[if lt IE 9]><script src="~/Scripts/html5shiv.js"></script><![endif]-->
    <%: Scripts.Render("~/Script/ContetnPage") %>
    <script type="text/javascript">
        var dialogObj;
        $(function ()
        {
            dialogObj = $("#dialog-modal").clone(true,false);
            $(dialogObj).dialog({
                height: 240,
                width: 540,
                title: "回复",
                modal: true,
                autoOpen: false
            });

            $('.Score').raty({
                path: '../Scripts/Raty/img/', half: true,
                score: 4
            });
 
            $(".ok").click(function () {
                PostComment($(this).parent(), ModelId);
            });
        });
        function ShowReply(id)
        {
            $(dialogObj).dialog("open");
            $(dialogObj).find('.Score').raty({
                path: '../Scripts/Raty/img/', half: true,
                score: 4
            });
            dialogObj.attr("ReplyID", id);
        }
    </script>
</head>
<body>
    <!--#include file="../Header.aspx"-->
    <form runat="server" id="form1">
    <div style="margin-left: auto; margin-right: auto; width: 986px">
        <div style="width: 696px; float: left; padding-right: 0px;">
            <span style="height: 80px; display: block; line-height: 80px; vertical-align: middle;
                text-align: center;"><a href="<%=model.Link %>" target="_blank" style="font-size: 24px">
                    <%=model.ContentTitle%></a></span>
            <asp:Repeater ID="RP_Comment" runat="server">
                <ItemTemplate>
                    <table border="0" cellpadding="0" cellspacing="1" style="margin-bottom: 5px; width: 690px;
                        background-color: #DCDCDC">
                        <tr>
                            <td colspan="2" align="left" bgcolor="#F2F2F2" height="28">
                                <div style="float: left; width: 60%">&nbsp;&nbsp;<%# UserName( Eval("UserName"))%> <%# Eval("CreateTime")%></div>
                                <div style="float: left; width: 40%">来自：&nbsp;<%# Eval("IP") %><%# Address(Eval("IP"))%></div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" bgcolor="#FFFFFF" valign="top" width="70">
                                <img src="Images/anonymous.gif" border="0" height="48" width="48" alt="" style="margin-left: auto;
                                    margin-right: auto; margin-top: 16px; margin-bottom: 16px;" />
                            </td>
                            <td align="left" bgcolor="#FFFFFF" width="535">
                                <%# GetContent(Container.DataItem) %>
                                 
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:Repeater>
            <div style="margin-bottom: 5px; width: 690px; border: #DCDCDC 1px solid;
                margin-bottom: 5px;">
                <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" Width="100%">
                </WinnerCMS:PageNavigation>
            </div>
            <div class="Post" id="dialog-modal" ContentId="<%=model.Id %>">
                <div style="float: left; margin-left: 4px; height: 24px; clear:both;">
                    发表评论：</div>
                <textarea class="Content" rows="5" cols="20" style="margin-bottom: 5px; width: 100%;"></textarea>

                
                <div class="Score">
                </div>
                <input class="btn ok" type="button" value="提交" />
            </div>
        </div>
        <div style="width: 260px; float: left;">
            <section class="div_ListBox">
                <header>
                        <h2>本文最热评论</h2>
                </header>
                <div class="Content">
                    <asp:Repeater ID="RP_CommentHot" runat="server">
                        <ItemTemplate>
                            <table align="center" bgcolor="#dcdcdc" border="0" cellpadding="0" cellspacing="0"
                                style="margin-bottom: 5px; width: 100%">
                                <tr>
                                    <td align="left" bgcolor="#f2f2f2" height="28">
                                        <span class="f12_blue">
                                            <%# Eval("UserName")%></span> <span class="f12">
                                                <%# Eval("CreateTime")%></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff" valign="top">
                                        <div style="-moz-word-break: break-all; -o-word-break: break-all; word-break: break-all; overflow: hidden; width: 260px; padding-left: 3px;"
                                            class="f12">
                                            <%# Eval("Content")%></div>
                                        <div style="margin-top:5px; text-align:right;">
                                       <a href='#' onclick="SupportOrOppose(<%# Eval("ID") %>,true,this);return false;">支持(<%# Eval("Support")%>)</a>&nbsp;&nbsp;&nbsp;<a href='#' onclick="SupportOrOppose(<%# Eval("ID") %>,false,this);return false;">反对(<%# Eval("Oppose")%>)</a>&nbsp;&nbsp;&nbsp;<a title="点击回复此评论" href="javascript:ShowReply(<%# Eval("ID") %>)" class="f12">回 复</a></div>
                                 
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </section>
            <section class="div_ListBox">
                <header class="tab">
                    <h2 class="active">
                        一周
                    </h2>
                    <h2>
                        一月
                    </h2>
                </header>
                <div class="Content">
                    <ul>
                        <asp:Repeater ID="RP_Week" runat="server">
                            <ItemTemplate>
                                <li><a href="<%#Eval("Link") %>" title="<%#Eval("ContentTitle") %>">
                                    <%#Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
                <div class="Content" style="display: none">
                    <ul>
                        <asp:Repeater ID="RP_Month" runat="server">
                            <ItemTemplate>
                                <li><a href="<%#Eval("Link") %>" title="<%#Eval("ContentTitle") %>">
                                    <%#Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
            </section>
        </div>
    </div>
    </form>
    <!--#include file="../Footer.aspx"-->
</body>
</html>
